import request from '@/utils/request'

// 查询知识点教案列表
export function listPlan(query) {
  return request({
    url: '/receipt/knowledgePlan/list',
    method: 'get',
    params: query
  })
}

// 查询知识点教案详细
export function getPlan(id) {
  return request({
    url: '/receipt/knowledgePlan/' + id,
    method: 'get'
  })
}

export  function getPlanByManagerId(id){
  return request({
    url: '/receipt/knowledgePlan/getPlanByManagerId/'+id,
    method: 'get'
  })
}

// 新增知识点教案
export function addPlan(data) {
  return request({
    url: '/receipt/knowledgePlan',
    method: 'post',
    data: data
  })
}

// 修改知识点教案
export function updatePlan(data) {
  return request({
    url: '/receipt/knowledgePlan',
    method: 'put',
    data: data
  })
}

// 删除知识点教案
export function delPlan(id) {
  return request({
    url: '/receipt/knowledgePlan/' + id,
    method: 'delete'
  })
}

// 导出知识点教案
export function exportPlan(query) {
  return request({
    url: '/receipt/knowledgePlan/export',
    method: 'get',
    params: query
  })
}
